home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
awe2-0_1.lha
/
awe2-0.1
/
Src
/
RCS
/
LockedHeap.h,v
< prev
next >
Wrap
Text File
|
1989-02-23
|
2KB
|
127 lines
head 3.2;
branch ;
access ;
symbols ;
locks grunwald:3.2; strict;
comment @ * @;
3.2
date 89.02.20.15.35.49; author grunwald; state Exp;
branches ;
next 3.1;
3.1
date 88.12.20.13.50.00; author grunwald; state Exp;
branches ;
next 1.2;
1.2
date 88.10.30.13.05.53; author grunwald; state Exp;
branches ;
next 1.1;
1.1
date 88.09.18.16.42.10; author grunwald; state Exp;
branches ;
next ;
desc
@@
3.2
log
@Start using Gnu library heaps for schedulers
@
text
@// This may look like C code, but it is really -*- C++ -*-
//
// Copyright (C) 1988 University of Illinois, Urbana, Illinois
//
// written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
//
#ifndef LOCKEDHEAPH
#define LOCKEDHEAPH
#include "Semaphore.h"
#include "AwesimeHeap.h"
class LockedHeap : public AwesimeHeap {
protected:
Semaphore heapLock;
public:
inline LockedHeap(int defaultLength = 0)
: (defaultLength), heapLock(1) {
//
// do nothing
//
}
//
// Operations on the list -- these simply lock the list and
// then use the AwesimeHeap routines to perform the action.
//
virtual void add(AwesimeHeapItem & t);
virtual bool remove(AwesimeHeapItem & item);
//
// Over-ride the doStart and doDone; these use the semaphore
// to lock out other threads.
//
virtual bool doStart( AwesimeHeapIndex& index);
virtual void doDone();
//
// The size and printer also locks out other threads.
//
virtual unsigned int size();
virtual void classPrintOn(ostream& s);
};
#endif LOCKEDHEAPH
@
3.1
log
@Steay version
@
text
@@
1.2
log
@*** empty log message ***
@
text
@d16 1
a16 1
Semaphore fifoLock;
d20 1
a20 1
: (defaultLength), fifoLock(1) {
d30 2
a31 3
virtual void add(AwesimeHeapItem *t);
virtual bool remove(AwesimeHeapItem *item);
virtual bool removeIfFound(AwesimeHeapItem* item);
d38 1
a38 1
virtual bool doStart( AwesimeHeapIndex& index, AwesimeHeapItem* item);
@
1.1
log
@Initial revision
@
text
@d1 6
@